import java.sql.SQLOutput;
import java.util.Scanner;

public class Threadd4 {
    static  int  falg = 0;
    public static void main(String[] args) throws InterruptedException {
        Thread t1 = new Thread(()->{
            while (falg==0){
                try {
                    Thread.sleep(10);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }
            System.out.println("t1停下来了");
        });
        Thread t2 = new Thread(()->{
            System.out.println("输入");
            Scanner scanner = new Scanner(System.in);
            falg = scanner.nextInt();
        });
        t1.start();
        t2.start();

    }
}
